<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./node_modules//vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <h1>{{name}},非常帅</h1>
        <input type="text" v-model = "num"/>
        <button v-on:click="num++">点赞</button>
        <button v-on:click="cancle">取消</button>
        <h2>{{name}} 非常帅，有{{num}}点赞{{hello()}}</h2>
    </div>
    <script>
        //1. 声明式渲染
        
        let vue = new Vue({
            el: "#app",//绑定元素
                data: {
                name: "张三",
                num:0
            },
            methods:{
                cancle(){
                    this.num--;
                },
                hello(){
                    return "1";
                }

                //v-xx指令
                //创建页面实例


            }
            
        })
    </script>
</body>
</html>